home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PD Collection CD 1
/
PD Collection CD 1.iso
/
utils3
/
treemenu
/
!TreeMenu
/
!Help
< prev
next >
Wrap
Text File
|
1994-09-21
|
14KB
|
358 lines
TreeMenu 2.70 (14 Feb 1994)
---------------------------
Introduction
------------
(If you already use DirMenu/TreeMenu, look in 'History' to find a quick
description of the changes since the last released version.)
This utility provides an easy way to access directories/files of your
disc and resource filing systems without thrashing through endless filer
windows.
It provides hierachical menus containing the tree structure of any of
your filing systems. These menus can be opened either by clicking with
<Select> on one of TreeMenu's icon-bar icons, or clicking with <Menu> on
the title bar of *any* window whose title contains a filename.
Alt-<Menu> clicks inside Filer windows are also detected.
Choosing an item in a menu will do exactly the same thing as
double-clicking it in a normal Filer window - i.e. open directories,
load files, or run applications. TreeMenu just does a '*Filer_Run ...'
on whatever you clicked on, so hold down <shift> to open application
directories / load files into your text editor, or <ctrl> to open a
directory without booting applications. Choosing a menu item with
<Adjust> will keep the menu open.
If a window contains a valid filename in the title, clicking <Menu> on
the title-bar of the window will bring up a menu containing all the
parents of the filename, and also the contents of the parent directory.
Try clicking on the title bar of this window to see the contents of the
'!TreeMenu' application directory. This allows you to access the
directory of a file, its sub-directories, or any of its parents very
easily, and also to branch out into any other part of the directory's
filing system.
Clicking <Menu> on the title bar of a Filer window works in a similar
way. Also, TreeMenu responds to Alt-Menu clicks inside Filer windows
only.
When a menu is brought up by clicking on a window, there will be an
extra item 'Set CSD'. Choosing this will set the Currently Selected
Directory (CSD) to the title of a Filer window, or the parent directory
of, for example, an !Edit window.
TreeMenu comes set up to have one icon-bar icon. Clicking <Select> on it
will bring up a menu containing the contents of ADFS::4 (your hard
drive, if you have one), as well items leading to your Resource filing
system, your scrap directory, the Currently Selected Directory (CSD) and
whatever is in your floppy disc drive.
Clicking <Menu> on any TreeMenu bar-icon will bring up a conventional
Info/Quit menu, with these other items:
• Help loads this file into your text-editor.
• Edit !Configs loads '!Configs' into your text-editor for
editing.
• Update re-scan '!Configs'. Do this if you change
'!Configs' while TreeMenu is running.
Options.
--------
All options are set in the file '!Configs' in !TreeMenu's directory. To
change the options, you should edit the file using a text editor such as
!Edit. If TreeMenu is running, you will need to choose 'Update' from the
normal bar-icon menu after saving the new version of '!Configs'.
The file contains comments on how to specify the various parameters; it
should be fairly clear how to change things, so this is just a brief
guide:
Things that you can change:
• Menu colours.
• Where to open iconbar menus on the screen.
• Whether to expand paths containing system variables.
• Whether to detect <Menu> clicks on window titlebars.
• Whether to detect <Menu> clicks only on Filer titlebars.
• Whether to have a 'Set CSD' item in window menus.
• Whether to reverse Select/Menu response for iconbar clicks.
• Whether to set the CSD to the chosen item if <Alt> is pressed.
• Whether to make large menus auto-scrolling.
• Number of iconbar icons.
• The contents of each bar-icon.
Menu colours
------------
These are in the following order:
Work foreground, Work background, Title foreground, Title background.
(Normal RISC OS menu colours are: 7 0 7 2. I find a white background a
bit bright on large menus.)
Menu position (NORMAL, BOTTOMLEFT or TOPLEFT)
--------------------------------------------
This sets where menus are open in response to clicks on the iconbar.
BOTTOMLEFT - open normal height but on far left of screen
TOPLEFT - open in top left corner of screen
NORMAL - normal RISC OS position above the icon you clicked on.
Path expansion (EXPAND or PRESERVE)
-----------------------------------
If you have an iconbar menu specified like 'System:', any opened filer
windows will have titles starting with 'System:' rather than the full
path name. This can result in you having two filer windows open for the
same directory, which can be a bit confusing. To avoid this, use
EXPAND, and any filenames will be expanded before they are
Filer_Run-ed.
NB, FilerPatch does this automatically, so if you use it, this option
will have no effect.
Always have a 'Set CSD' in window menus
---------------------------------------
If you turn this off (which saves a bit of space on window menus), you
can force it to appear by holding down <Shift> when you click on a
window titlebar.
Use reversed Menu/Select buttons for iconbar clicks ? (YES or NO)
-----------------------------------------------------------------
This makes Select behave like Menu, and visa-versa, when you click on an
iconbar icon. This is so you can use the Menu button for both iconbar
and window titlebar menus. Note that using this option makes TreeMenu
inconsistant with the rest of RISC OS.
Set the CSD to the chosen item if <Alt> is pressed.
---------------------------------------------------
If this option is YES, !TreeMenu will set the CSD to items chosen from
file/directory menus if you hold down the <Alt> key wjen you make the menu
choice. !TreeMenu will beep when you set the CSD in this way.
Auto-scrolling menus.
---------------------
If this option is YES, !TreeMenu will automatically scroll large menus
when you move the pointer to the top or bottom of the menu. If you move
the pointer to the very top or bottom of the menu, it will scroll down a
page at a time (as though you clicked above or below the scroll bar),
otherwise it will scroll more slowly, as though you clicked on one of
the scroll arrows.
The contents of each bar-icon menu are a series of file paths, e.g.
'ADFS::4.$' or 'Resources:'. TreeMenu will create a menu containing each of
these paths separated by gaps. In addition, you can append a '*' to a path,
which will make TreeMenu add the first-level contents underneath the path.
i.e. 'ADFS::4.$*' will add the contents of the root directory of your hard
disc to the menu, which saves you moving to a submenu, at the expense of
making the root menu bigger.
You should change 'ADFS::4.$*' to contain whatever your hard disc is
called, i.e. 'ADFS::<discname>.$*'.
Don't append a '.' to any item.
Making a separate bar-icon point to a very frequently used directory can
be very convenient. This is made easier if the directory is an
application which sets a system variable to its location. You can then
use <...$Dir> in TreeMenu's '!Configs' file.
You can create a menu of *commands by creating an application directory
that contains various Obey files, and then make a TreeMenu icon wich
displays this directory.
Any system variables can be items in a TreeMenu menu, by specifying them
in '!Configs', e.g. '@' to get at the CSD, or '<Wimp$ScrapDir>'.
Note that if an item that you specified looks like a floppy disc, the
Wimp will ask you to insert it each time you go to that item in the menu
tree.
Random nice features:
---------------------
• Configurable colours! Big white menus are a bit of an
eye-sore. If you don't like the colour scheme, just alter the
'!Configs' file.
• Compatible with Jens Ovesen's FilerPatch. i.e. directories which
have been set to look like applications in Filer windows (bit 7
of Access set) are detected, and displayed correctly by
TreeMenu.
• Files/directories which are hidden by FilerPatch (bit 6 of
Access set) are displayed with fainter text, but are still
selectable.
• You can go into the directory structure of image files just as
though they are directories.
• Text in the menus is padded with spaces so that the highlighting
is clear. I did this because the Wimp doesn't highlight
text+sprite menu-icons very well.
• Being able to bring up a menu for a Filer windor by clicking
<Menu> on the title bar means you can have fewer Filer windows
open to save desktop clutter, but still have easy access to all
your files.
• You can set the number of icon-bar icons to be zero. This will
save space on the icon bar, but clicking on Filer windows will
still work. You will have to quit TreeMenu from the Task Manager
window if you do this.
• TreeMenu is set to expand pathnames prior to Filer_Run-ing them,
i.e. system variables and '@' (representing the CSD) in the path
name are expanded. This uses the SWI "OS_FSControl". You can
turn this option off by altering '!Configs'.
NB. I think Jens Ovesen's FilerPatch 1.13 automaticaly expands
filenames in Filer_Run commands, so this option won't make any
difference if you use FilerPatch.
• You can turn off the 'Set CSD' item in window menus by altering
'!Configs', but holding down <Shift> when clicking on the title
bar of a window will force this item to appear regardless of the
'!Configs' option. This is useful if you hardly ever use the
CSD, so don't need this item accept on rare occasions.
• The facility to open a menu by clicking on (for example) a text
editor window is dead useful - e.g. You're editing a file with
the window full-size, and want to look at a second file in the
same directory. Without TreeMenu, you have to move the window,
find its Filer window, then double-click on the second file etc.
With TreeMenu, you simply click on the big window's title, and
choose the second file directly. This makes a big difference
when programing in C for example, where source files are
typically in the same directory.
Another example: you might want to look at TreeMenu's 'History'
file when viewing this !Help text, so just click <Menu> on the
titlebar to bring up the !TreeMenu directory, and choose
'History'.
• Auto-scrolling of menus. This is a very useful option. I think
that Acorn should have made menus auto-scrolling from the start
- it is a real nuisance to have to drag the scrollbar of a menu
in order to get to choose an item. Most menus on the Arc are
small enough to fit on one screen, so I s'pose its not too much
of a problem normally. !TreeMenu often has big menus, so Acorn's
oversight is more telling. I have had no problems with the
autoscrolling, but it could conceivably cause problems, so I
have allowed the user to turn it off.
The autoscrolling isn't particulaly smooth, but it's the best I
can do!
Problems:
---------
I've found that the text-editor !Zap only stores part of a window's
title in the window definition, presumably to ensure that the right hand
side of the title is always visible, regardless of window size.
Unfortunately, this means that TreeMenu will not get the whole window
title when Menu is clicked on a small Zap window. Hence the menu brought
up will sometimes be incorrect if Zap's window titlebar doesn't have
room for the complete path. I don't really know of a way of curing this,
as there is no way for TreeMenu to find the full filename.
--------------------------------------------------------------------------
Getting the latest version
--------------------------
I've decided to release only old versions of TreeMenu, and reserve the
latest versions for those people who send me a donation to Amnesty
International (see below).
Details of improvements made in the latest version (4.24 at the
moment) are in the file '!TreeMenu.History'
Other Stuff
-----------
Special thanks are due to Steven Haslam, Denis Howe, Ashley Oliver, Paul
Pibworth, A C Blake and Simon Middleton.
Many thanks to Dominic Symes for his superb text editor !Zap, and to
Jason Williams et al for the equally superb Wimp C library, 'DeskLib'.
This program is freeware. It may NOT me used in connection with any
profit-making activities. Please contact me if you want to distribute
TreeMenu in a PD library.
TreeMenu is copyright Julian Smith 1994. Feel free to distribute this
program, but you may only distribute the ORIGINAL version, with all
files present.
************************************************************************
* *
* If you find this program useful, you might like to make a donation *
* to Amnesty International, say £5, by sending me a cheque made out to *
* them. *
* *
* I shall send you the latest version of TreeMenu (4.24 at the moment *
* - see the History file for details) and new versions as they become *
* available if you do this (please enclose a disc if you're not on *
* email). I'll also be more likely to add features/bug fixes for you *
* *
************************************************************************
Also, please let me know if you have any comments, problems, suggestions
or praise, (or have found a bug!).
- Julian Smith
------------------------
julians@cogsci.ed.ac.uk
------------------------
or:
------------------------
Department of Psychology
University of Edinburgh
7 George Square
Edinburgh
EH8 9JZ
UK
------------------------